#include "tls_curve.h"

void ssl_generate_pkey(struct ssl_connection *ssl) {
    curve25519_generate_secret(ssl->prikey);
}

int ssl_generate_pubkey(struct ssl_connection *ssl) {
	return curve25519_generate_public(ssl->pubkey, ssl->prikey);
}

int ssl_generate_pms(struct ssl_connection *ssl) {
   return curve25519(ssl->pms, ssl->prikey, ssl->peer_pubkey);
}
